import request from '@/utils/request'

// 查询答题题目列表
export function listTrainProblem(query) {
  return request({
    url: '/question/trainProblem/list',
    method: 'get',
    params: query
  })
}

// 查询答题题目详细
export function getTrainProblem(id) {
  return request({
    url: '/question/trainProblem/' + id,
    method: 'get'
  })
}

// 新增答题题目
export function addTrainProblem(data) {
  return request({
    url: '/question/trainProblem',
    method: 'post',
    data: data
  })
}

// 修改答题题目
export function updateTrainProblem(data) {
  return request({
    url: '/question/trainProblem',
    method: 'put',
    data: data
  })
}

// 删除答题题目
export function delTrainProblem(id) {
  return request({
    url: '/question/trainProblem/' + id,
    method: 'delete'
  })
}

// 查询答题题目列表 不包含在活动表的
export function listTrainProblemExtrActivity(query) {
  return request({
    url: '/question/trainProblem/list/extr/activity',
    method: 'get',
    params: query
  })
}

